home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / xclip / README < prev   
Encoding:
Text File  |  2009-08-10  |  3.8 KB  |  132 lines

  1.  
  2.  
  3. WHAT IS XCLIP?
  4. ==============
  5.  
  6. xclip is a command line utility that is designed to run on any system with an
  7. X11 implementation. It provides an interface to X selections ("the clipboard")
  8. from the command line. It can read data from standard in or a file and place it
  9. in an X selection for pasting into other X applications. xclip can also print
  10. an X selection to standard out, which can then be redirected to a file or
  11. another program.
  12.  
  13. USING XCLIP
  14. ===========
  15.  
  16. Here are some ideas for things you can do with xclip:
  17.  
  18.     Copy your uptime into the selection for pasting:
  19.     uptime | xclip
  20.  
  21.     Copy your password file for pasting:
  22.     xclip /etc/passwd
  23.  
  24.     Save some text you have Edit | Copied in a web browser:
  25.     xclip -o -sel clip > webpage.txt
  26.  
  27.     Open a URL selected in an email client
  28.     mozilla `xclip -o`
  29.  
  30.     Copy XA_PRIMARY to XA_CLIPBOARD
  31.     xclip -o | xclip -sel clip
  32.  
  33.     In command mode in vim, select some lines of text, then press shift-:
  34.     for an ex prompt, and use this command to copy the selected lines of
  35.     text to the primary X selection:
  36.     !xclip -f
  37.  
  38.  
  39. USING XCLIP FOR MOVING FILES
  40. ============================
  41.  
  42. The programs xclip-copyfile, xclip-pastefile, and xclip-cutfile can be
  43. used for copying and moving files between different directories and
  44. even machines, assuming that you have a working X11 connection. Here
  45. are some examples:
  46.  
  47. # Copying a file to a remote host
  48. [maggie.lkpg.cendio.se ~]$ echo "A file created on ${HOSTNAME}" > file1
  49. [maggie.lkpg.cendio.se ~]$ xclip-copyfile file1
  50. [sofie.homeip.net ~/doc]$ xclip-pastefile
  51. file1
  52. [sofie.homeip.net ~/doc]$ cat file1
  53. A file created on maggie.lkpg.cendio.se
  54.  
  55.  
  56. # Copying an entire tree structure
  57. [sofie.homeip.net ~]$ xclip-copyfile doc
  58. [maggie.lkpg.cendio.se ~/tmp]$ xclip-pastefile
  59. doc/
  60. doc/letter-mom-april.txt
  61. doc/file1
  62. doc/letter-dad-march.txt
  63.  
  64.  
  65. # Copying files with preserved path information
  66. [maggie.lkpg.cendio.se ~]$ xclip-copyfile -p /etc/sysconfig/grub
  67. tar: Removing leading `/' from member names
  68. [sofie.homeip.net ~/tmp]$ xclip-pastefile
  69. etc/sysconfig/grub
  70. [sofie.homeip.net ~/tmp]$ ls etc/sysconfig/grub
  71. etc/sysconfig/grub
  72.  
  73.  
  74. # Moving files
  75. [sofie.homeip.net ~]$ ls letter-brother-may.txt
  76. letter-brother-may.txt
  77. [sofie.homeip.net ~]$ xclip-cutfile letter-brother-may.txt
  78. [sofie.homeip.net ~]$ ls letter-brother-may.txt
  79. ls: cannot access letter-brother-may.txt: No such file or directory
  80. [sofie.homeip.net ~]$ cd doc
  81. [sofie.homeip.net ~/doc]$ xclip-pastefile
  82. letter-brother-may.txt
  83.  
  84.  
  85. FEATURES
  86. ========
  87.  
  88. * Reads data piped to standard in or files given as arguments
  89. * Prints contents of selection to standard out
  90. * Accesses the XA_PRIMARY, XA_SECONDARY or XA_CLIPBOARD selection
  91. * Accesses the cut-buffers
  92. * Supports the INCR mechanism for large transfers
  93. * Connects to the X display in $DISPLAY, or specified with -display host:0 
  94. * Waits for selection requests in the background
  95.  
  96. SELECTIONS
  97. ==========
  98.  
  99. For a good overview of what selections are about, have a look at 
  100. <http://www.freedesktop.org/standards/clipboards.txt>. Short version:
  101.  
  102. * XA_PRIMARY contains the last text you highlighted
  103. * Middle click pastes XA_PRIMARY
  104. * XA_CLIPBOARD contains text explicitly copied with Edit | Copy, Ctrl-C etc.
  105. * Edit | Paste pastes XA_CLIPBOARD
  106. * xclip uses XA_PRIMARY unless you specify otherwise with -selection 
  107.  
  108. CAN I HELP?
  109. ===========
  110.  
  111. Glad you asked! At this stage, I'm pretty happy with the features and
  112. implementation, so if you have anything at all that should be done, I want to
  113. hear about it. Doesn't matter how small, compiler warnings, segfaults, spelling
  114. mistakes, whatever, I want to get it sorted out. xclip is not a big project,
  115. I'd like to get all these things sorted out and then declare it "complete".
  116.  
  117. LICENSE
  118. =======
  119.  
  120. GNU GPL, see the COPYING file for details.
  121.  
  122. CONTACT
  123. =======
  124.  
  125. Web:
  126. http://xclip.sourceforge.net
  127.  
  128. Email:
  129. astrand@lysator.liu.se
  130.  
  131. Please email me about problems, experiences, patches, fixes, etc. 
  132.